package com.caroil.caroilservice.network;


import com.caroil.caroilservice.bean.BaseBean;
import com.caroil.caroilservice.bean.LoginBean;
import com.caroil.caroilservice.bean.TokenBean;
import com.caroil.caroilservice.network.Utils.BaseResponse;


import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Url;

public interface ApiUrl {
    /**
     * 有效链接
     */

    @Headers("Accept:application/json")
    @POST(Constans.LOGIN)
    Observable<BaseResponse<LoginBean>> postLogin(@Body RequestBody body);

    @Headers("Accept:application/json")
    @POST(Constans.GETPHONECODE)
    Observable<BaseResponse<BaseBean>> postPhoneCode(@Body RequestBody body);

    @Headers("Accept:application/json")
    @POST(Constans.LOGINPHONECODE)
    Observable<BaseResponse<LoginBean>> postPhoneCodeLogin(@Body RequestBody body);

    @GET
    Observable<TokenBean> getToken(@Url String url);


}

